﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FatHibernation.DataInterface;
using NHibernate;

namespace FatHibernation.Data
{
    public interface IDataRepository
    {

        ICriteria CreateCriteria<T>() where T:ISavable;
        IQuery CreateQuery(string hql);

        T Load<T>(int ID) where T : ISavable;
        void Delete(ISavable bo);
        void Save(ISavable bo);
        
        //void Lock(ISavable elephantable, bool readOnly);

    }
}
